check button: Reinstate rtl allocation behavior
authorMatthias Clasen <mclasen@redhat.com>
Fri, 4 Mar 2016 02:26:39 +0000 (21:26 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 4 Mar 2016 02:28:51 +0000 (21:28 -0500)
In rtl mode, we must not just reverse the children,
but also allocate from the right. Use the newly introduced
box gadget api to achieve this.

https://bugzilla.gnome.org/show_bug.cgi?id=762945

gtk/gtkcheckbutton.c

index dc899c9f3595ab9550215280e5cd125324c3a780..06890d0b268466b19dcb388356a93d38bb952562 100644 (file)
@@ -154,6 +154,8 @@ gtk_check_button_direction_changed (GtkWidget        *widget,
   GtkCheckButtonPrivate *priv = gtk_check_button_get_instance_private (GTK_CHECK_BUTTON (widget));
 
   gtk_box_gadget_reverse_children (GTK_BOX_GADGET (priv->gadget));
+  gtk_box_gadget_set_allocate_reverse (GTK_BOX_GADGET (priv->gadget),
+                                       gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
 
   GTK_WIDGET_CLASS (gtk_check_button_parent_class)->direction_changed (widget, previous_direction);
 }